package com.common.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author liuxuhuang
 * @date 2023年04月08日 16:12
 * @desc
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SendEmailDTO {
    private String subject;
    private String content;
    private String to;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SendEmailDTO)) return false;

        SendEmailDTO that = (SendEmailDTO) o;

        if (!getSubject().equals(that.getSubject())) return false;
        if (!getContent().equals(that.getContent())) return false;
        return getTo().equals(that.getTo());
    }

    @Override
    public int hashCode() {
        int result = getSubject().hashCode();
        result = 31 * result + getContent().hashCode();
        result = 31 * result + getTo().hashCode();
        return result;
    }
}
